package org.cyz.tools.common.util;

import javafx.application.Platform;
import javafx.scene.control.Label;

import java.io.IOException;

/**
 * @author abccy
 * @title: ApplicationUtil
 * @projectName RedisGUI
 * @description: TODO
 * @date 2020-9-1822:18
 */
public class ApplicationUtil {

    /**
     * 初始化应用信息
     * @param title
     */
    public static void initApplicationInfo(Label title) {
        Platform.runLater(() -> {
            try {
                title.setText(PomUtil.applicationInfo().getArtifactId() + " " + PomUtil.applicationInfo().getVersion());
            } catch (IOException e) {
                e.printStackTrace();
            } catch (Exception e) {
                e.printStackTrace();
            }
        });
    }
}
